package com.scuec.tourismwebsite.service;

import com.github.pagehelper.PageInfo;
import com.scuec.tourismwebsite.entity.FreeformPost;
import com.scuec.tourismwebsite.vo.AdminPost;
import com.scuec.tourismwebsite.vo.UserPost;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FreeformPostService {
    Integer deleteAPostById(Integer post_id);
    Integer insertPost(FreeformPost freeformPost);
    AdminPost findAPostById(@Param("post_id") Integer postId);
    Integer updateAPostCount(@Param("post_id") Integer post_id, @Param("comments_count") Integer comments_count,@Param("likes_count") Integer likes_count,@Param("collect_counts") Integer collect_counts);
    List<AdminPost> findAPostAllByUsername(String username);
    List<AdminPost> findAPostAll();
    PageInfo<AdminPost> findAdminPostPages(Integer pageNum, Integer pageSize);
    PageInfo<AdminPost> findAdminPostPage(String username,Integer pageNum, Integer pageSize);
}

